package com.youyun56.gps.android.common;

import java.util.HashMap;

public class YouyunMap extends HashMap<String, String> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -330792885213283182L;

	public Long getLong(String name) {
		String value = getString(name);
		return value != null ? Long.parseLong(get(name)) : null;
	}

	public Integer getInt(String name) {
		String value = getString(name);
		return value != null ? Integer.parseInt(get(name)) : null;
	}

	public Boolean getBoolean(String key) {
		String value = getString(key);
		return value != null ? Boolean.parseBoolean(value) : null;
	}
	
	private String getString(String key){
		String value = get(key);
		return value != null ? value.trim() : null;
	}

}
